package com.rbac.utils.commUtils;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Slf4j
public class LogUtil {

    private final Logger logger;

    private LogUtil(Logger logger) {
        this.logger = logger;
    }

    public static LogUtil getLogger(Class<?> clazz) {
        return new LogUtil(LoggerFactory.getLogger(clazz));
    }

    public void info(String format, Object... arguments) {
        logger.info(format, arguments);
    }

    public void warn(String format, Object... arguments) {
        logger.warn(format, arguments);
    }

    public void error(String format, Object... arguments) {
        logger.error(format, arguments);
    }

    public void debug(String format, Object... arguments) {
        logger.debug(format, arguments);
    }

    public void trace(String format, Object... arguments) {
        logger.trace(format, arguments);
    }

}
